Mamdani vs. Takagi–Sugeno Fuzzy Inference Systems in the Calibration of Continuous-Time Car-Following Models

The transition to intelligent transportation systems (ITSs) is necessary to improve traffic flow in urban areas and reduce traffic congestion. Traffic modeling simplifies the understanding of the traffic paradigm and helps researchers to estimate traffic behavior and identify appropriate solutions for traffic control. One of the most used traffic models is the car-following model, which aims to control the movement of a vehicle based on the behavior of the vehicle ahead while ensuring collision avoidance. Differences between the simulated and observed model are present because the modeling process is affected by uncertainties. Furthermore, the measurement of traffic parameters also introduces uncertainties through measurement errors. To ensure that a simulation model fully replicates the observed model, it is necessary to have a calibration process that applies the appropriate compensation values to the simulation model parameters to reduce the differences compared to the observed model parameters. Fuzzy inference techniques proved their ability to solve uncertainties in continuous-time models. This article aims to provide a comparative analysis of the application of Mamdani and Takagi–Sugeno fuzzy inference systems (FISs) in the calibration of a continuous-time car-following model by proposing a methodology that allows for parallel data processing and the determination of the simulated model output resulting from the application of both fuzzy techniques. Evaluation of their impact on the follower vehicle considers the running distance and the dynamic safety distance based on the observed behavior of the leader vehicle. In this way, the identification of the appropriate compensation values to be applied to the input of the simulated model has a great impact on the development of autonomous driving solutions, where the real-time processing of sensor data has a crucial impact on establishing the car-following strategy while ensuring collision avoidance. This research performs a simulation experiment in Simulink (MATLAB R2023a, Natick, MA, USA: The MathWorks Inc.) and considers traffic data collected by inductive loops as parameters of the observed model. To emphasize the role of Mamdani and Takagi–Sugeno FISs, a noise injection is applied to the model parameters with the help of a band-limited white-noise Simulink block to simulate sensor measurement errors and errors introduced by the simulation process. A discussion based on performance evaluation follows the simulation experiment, and even though both techniques can be successfully applied in the calibration of the car-following models, the Takagi–Sugeno FIS provides more accurate compensation values, which leads to a closer behavior to the observed model.


Introduction
The importance of traffic simulation models has increased in recent years with the growing interest in driver assistance systems and autonomous driving systems.The development and calibration of such complex systems can greatly benefit from the use of simulations to reduce time and costs.Among other traffic simulation models, the continuous-time car-following model is particularly useful in the design and fine-tuning of various advanced driver assistance systems (ADASs) such as adaptive cruise control [1] and cooperative adaptive cruise control [2,3], or in developing autonomous driving technologies [4,5].
This paper aims to evaluate the performance of two well-known fuzzy inference techniques, Mamdani [6] and Takagi-Sugeno [7], adapted for car-following model calibration.To the best of our knowledge, this is the first study conducted to assess the performance of the two techniques used for the calibration of the car-following model.However, similar investigations have been carried out in many other domains where they serve to identify the appropriate fuzzy inference system (FIS) to solve specific uncertainty problems [8], as will be discussed in the next section.
The justification behind conducting this research also results from a literature search and analysis on the main scientific databases, such as ISI Web of Science (WoS), Scopus, and Google Scholar.The search was carried out between 2 June and 5 September.Table 1 shows the total work related to the use of FISs in the calibration of the car-following models and the specific query applied to each database.After removing the 13 duplicates, only 7 satisfy the search objective of reporting an innovative scientific contribution [9][10][11][12][13][14][15], the other articles being reviews or papers that do not fully satisfy the search objective.Unfortunately, none of the analyzed research developed a comparison between the behavioral analysis of the calibration of car-following models in relationships with the aforementioned inference techniques.
Table 1.Quantitative scientific literature overview based on database search results.

Scientific Database
Query Results

ISI Web of Science (WoS)
("car-following" OR "vehicle-following") AND "calibration" AND "fuzzy" (Topic) 11 Scopus TITLE-ABS-KEY ( ( "car-following" OR "vehicle-following" ) AND "calibration" AND "fuzzy" ) 10 Google Scholar ("car-following" OR "vehicle-following") AND "calibration" AND "fuzzy" This research addresses a scientific literature gap related to a comparative analysis of the behavior of a car-following calibration system in the case of using Mamdani and Takagi-Sugeno FISs.To achieve this goal, this article has the following scientific contributions: • Performs a literature search on the main scientific databases such as ISI WoS, Scopus, and Google Scholar and evaluates the results obtained based on their relevance to the comparative analysis of the application of Mamdani and Takagi-Sugeno FISs in the calibration of car-following models; • Performs a literature review in two directions, one considering the approaches based on the application of the two fuzzy inference techniques in the calibration of carfollowing models, and another focusing on similar comparative investigations of these techniques in other fields of research; • Proposes an original methodology to perform the comparison of Mamdani and Takagi-Sugeno FISs in the case of the calibration of car-following models by adapting their characteristics according to the needs of the modeling of this concept; • Implements a three-parallel-simulation model in Simulink (MATLAB R2023a, Natick, MA, USA: The MathWorks Inc.) to reproduce the behavior of the observed carfollowing model and to calculate the compensation values to be applied to the input of the simulation model so that it replicates the behavior of the observed model; for this last purpose, two calibration models are implemented corresponding to the two fuzzy inference techniques; • Validates the proposed methods for the calibration of the car-following model using real-world traffic data and provides a comparative evaluation in terms of the performance of the Mamdani and Takagi-Sugeno FISs in the context of the calibration of the car-following models; • Identifies the limitations of this study and provides recommendations for future research.

Literature Review
This discussion of related work follows two directions.The first analyzes the applicability of fuzzy techniques in the implementation of the calibration process of car-following models, as identified during the literature analysis of the papers found according to the approach described in Section 1.The other direction consists of analyzing similar comparisons between Mamdani and Takagi-Sugeno FISs conducted in other domains, including also other topics found related to traffic monitoring and control.
Bennajeh and Ben Said [9] proposed a genetic algorithm for the calibration of their car-following model that uses an FIS in the lower level.This FIS was responsible for the anticipation of the velocities and drivers' behaviors.Chakroborty and Kikuchi [10] transformed an FIS used for the calibration of a car-following model into an artificial neural network (ANN) to better model the stimulus-response relationships.Chen et al. [11] used camera calibration and video tracking technology in their comparison between a fuzzy-based car-following model and the Gazis-Herman-Rothery (GHR) model.Nadimi et al. [12] focused on collision avoidance and introduced a mixed index (MI) as a parameter to be calibrated considering car-following scenarios.This parameter was built as the output of an FIS having as input the time-to-collision (TTC) and post-encroachment time (PET).Pop et al. [13] developed a hybrid model for the calibration of car-following models that used a Kalman filter to eliminate the noises that affect the inputs of a Takagi-Sugeno FIS.This approach showed good results compared to a Kalman-filter-only approach for a standard car-following model, but also on a refined model that considered the lane change behavior [14] according to the evaluation of daytime and night-time traffic profiles.Sun et al. [15] built an FIS to calibrate car-following models based on two driving styles (i.e., aggressive and non-aggressive).The results showed good performance, especially in the case of an intelligent driver model (IDM).
However, the use of fuzzy-based solutions showed promising results in addressing the uncertainties in autonomous driving systems capable of ensuring collision avoidance.Pérez et al. [16] developed a fuzzy logic controller to adapt the velocity of the vehicle based on sensor data fusion retrieved with the help of radio frequency identification (RFID) technology.Terán et al. [17] used a Mamdani FIS in the development of a driver assistant responsible for alerting drivers in the case of traffic accidents based on the analysis of the risk map of the road accidents and vehicle telemetry.Fernandez et al. [8] proposed a classification system for driver behavior based on a Mamdani FIS that contains a knowledge base learned through a genetic algorithm.Ronquillo-Cana et al. [18] used a Mamdani FIS to classify driving styles in their approach that combined data obtained from sensors with the behavioral analysis of the drivers resulting from the application of the analytical hierarchy process (AHP) methodology on the questionnaires answered by these human subjects.
Similar comparative studies were conducted in various fields, such as optical [19] and wireless [20] networks, magnetic bearing system control [21], chaotic time series prediction [22], evaluation of user experience for specific applications [23], and streamflow prediction in the hydrological field [24].Although Takagi-Sugeno usually showed better results, the research in the hydrological domain showed that the Mamdani FIS is more suitable.This is mainly explainable through the easier process of expressing human expertise with the Mamdani rules [24].
An increased number of articles that conducted comparisons between the fuzzy techniques analyzed in this study was observed in the field of power engineering.Phunpeng and Kerdphol [25] concluded that the Takagi-Sugeno FIS is more efficient in the adaptive inertia control of an islanded microgrid that considers the limitations and restrictions of thermal and wind generation.This technique was also appropriate for optimizing power extraction from photovoltaic solar systems in a simulation experiment considering various radiations [26].The problem was formulated as a problem of maximum power point tracking (MPPT) with the goal of identifying the appropriate converter duty cycle to adapt to changes in environmental conditions, considering as input variables the slope of the voltage-power diagram and its changes [26,27].Samavat et al. [26] also investigated the influence of the number of input membership functions, while Boutaybi et al. [27] analyzed the performance of the two fuzzy techniques compared to the perturb and observed method.The Mamdani FIS was also not considered suitable for optimizing the weight on bit during drilling operations in the research conducted by Khosravanian et al. [28] for two producing fields in Iran (i.e., Ahwaz oil field and Marun gas field formations).
However, the studies performed are not limited to the comparison of these two fuzzy techniques: they also investigated possible directions of optimization that can benefit in both cases.Bagis and Konar [29] applied the artificial bee colony algorithm to optimize the process of determining the parameters of the fuzzy models.Their experiment performed for a nonlinear system consisting of a microstrip antenna demonstrated a good contribution in terms of accuracy, reliability, and processing time.
The existing literature also offers some comparisons between Mamdani and Takagi-Sugeno FISs related to intelligent transportation systems (ITSs), except for the topic of car-following calibration.Saleh et al. [30] performed a comparison of these techniques in the design of a speed controller for a remote car, the analysis of the results showing better results in the case of the Takagi-Sugeno FIS.Another topic investigated is the prediction of traffic flow based on historical data [31], where the Takagi-Sugeno technique achieved faster processing times compared to Mamdani.However, the Mamdani technique proved to have a better performance, in terms of percentage error, in the prediction of traffic noise levels, as argued by Saleh et al. [32] based on the results of their simulation experiment.

Materials and Methods
This research applies the methodology illustrated in Figure 1 to assess the impact of Mamdani and Takagi-Sugeno FISs in the calibration process of a continuous-time carfollowing model [33,34].Since the measurement of sensor data and the simulation process are governed by uncertainty because of the errors than can be introduced in the simulated model, this problem is made suitable for implementation with an FIS [8,13,14].In this way, the identification of the right compensation value that should be applied to the inputs of the simulated car-following model to counteract the aforementioned errors operates with a metric of fuzzy logic called the degree of membership [35].This evaluation implies the existence of an observed model, a simulated model, and a validation system responsible for the identification of how faithfully the simulation model replicates the behavior of a real-world system (i.e., observed model).
A simulated car-following model has as main components a subsystem designed for parameters handling and a subsystem responsible for the control strategy of the vehicle behind (i.e., FV-follower vehicle) based on the observed behavior of the vehicle moving ahead (i.e., LV-leader vehicle), while ensuring collision avoidance [36].In this research, the analysis of the calibration process requires the design and implementation of two calibration models, one using the Mamdani and the other the Takagi-Sugeno inference engines, in establishing the corresponding compensation values s_OFFSET_M and s_OFFSET_TS to be applied to the simulated running distance of FV (x 4 ).
The calibration system uses RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG at time t − τ as input variables in the alignment of the simulated value of the running distance of the FV with the value corresponding to the observed model at time t for both cases of inference engines.The validation system compares the dynamic characteristics of the observed system at time t with the simulated values obtained at time t after applying the compensation values according to the output of the calibration system for both cases of inference engines.As shown in Figure 1, the simulated system maintains the same control strategy [33,34] while separately handling the parameters for both cases evaluated in this article.In the following subsections, this article presents in detail the characteristics of each of the systems involved in this research.Furthermore, an experimental case study based on real traffic data is chosen to validate this research.All the following information allows other researchers to replicate this study and facilitates future developments.

Continuous-Time Car-Following Modeling and Calibration
The representation of traffic phenomena at microscopic level ensures a better granularity in identifying the root cause of traffic congestion and simplifies the identification of appropriate measures to improve the traffic control systems.According to Yin et al. [37], this road traffic model consists of four levels of representation, such as crossroads configuration, links, lane choice, and car following.The last level mentioned considers a single lane of traffic where the vehicles are moving in a chain and describes the control strategy of the vehicle behind (FV-follower vehicle) based on the observed behavior of the vehicle moving ahead (LV-leader vehicle) [36].
Figure 2 illustrates the concept of car following.This concept defines the movement in a traffic lane based on pairs of vehicles consisting of an LV and FV.The dynamic interaction between them should consider the behavior of the LV, the FV permanently adapting its control strategy to avoid collisions and maintain a safety distance during movement.Figure 2 depicts the dynamic characteristics associated with the concept of car following, such as the running distances of LV (x 2 ) and FV (x 4 ) and the evolution of the dynamic distance between the vehicles from s(t) to s(t − τ) during a period of time equal to τ.These distances are directly influenced by driver behavior, and an update in the velocity of the LV should be immediately observed by the FV and an acceleration or deceleration should be applied accordingly.In the case of autonomous driven vehicles, the observed behavior of the LV results from the sensor data processing, so the existence of high measurement errors can lead to traffic collision between the FV and LV.The state-space representation of the car-following model in continuous time and without time delay in Equation (1) uses the dynamic characteristics illustrated in Figure 2 and also new characteristics such as the velocity (x 1 ) and acceleration (u 1 ) of the LV, the velocity (x 3 ) and acceleration (u 2 ) of the FV, and the standard safety distance S [33,34].
The calculation of the standard safety distance S applies the average length of the vehicle for passenger cars (L = 4.50 m) according to Equation (2).The reason behind this calculation is to avoid collisions between the FV and LV during movement.
The purpose of the calibration process is to identify the compensation values that will be applied to the parameters of the simulated model to ensure that it fully reproduces the behavior of the observed system.Equation ( 3) is the continuous-time state-space representation of the calibration model corresponding to a car-following scenario [38].This illustrates the parameters to be calibrated and the corresponding compensation values such as γ 1 (t) for the velocity of the LV, γ 3 (t) for the velocity of the FV, and γ s (t) for the dynamic distance between vehicles.
Furthermore, the calibration considers the measurement errors that are already part of the observed parameters as defined in (4) considering a space length T [38].The notation used has the following significance:ζ 1 (t) is the measurement error of the LV velocity, ζ 3 (t) is the measurement error of the FV velocity, and ζ s (t) represents the measurement error of the dynamic distance between vehicles.

Fuzzy-Based Calibration of Continuous-Time Car-Following Models
Implementing an FIS (Figure 3) requires the following key components: fuzzification, knowledge base, inference, and defuzzification.The role of each component is explained further in relation to the topic of this research.Fuzzification is responsible for converting the numerical input values (i.e., the observed relative velocity RELATIVE_VELOCITY and the spacing I NTERVEH ICLE_SPACI NG between the LV and FV at time t − τ) into linguistic variables.The names chosen for the linguistic variables are similar to those existing in other similar studies [21,27,39,40], such as negative big (NB), negative small (NS), zero (ZE), positive small (PS), and positive big (PB).The knowledge base contains the rules expressed as "IF THEN" conditions that define the logical relations between the inputs RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG and the output s_OFFSET_x, where x = {M; TS} is defined separately for Mamdani (Section 3.2.2) and Takagi-Sugeno FISs (Section 3.2.3).These two components (i.e., fuzzification and knowledge base) are the same for both the Mamdani and Takagi-Sugeno FISs and are further described in Section 3.2.1,specially designated for the common configuration.Inference represents the decision-making process for the assessment of output values based on the degree of membership of the inputs according to the content of the knowledge base.Details related to each inference method are available in the specific sections (Sections 3.2.2 and 3.2.3).
Defuzzification converts the fuzzy sets [35] into a numerical value s_OFFSET_x, where x = {M; TS} represents the dynamic distance between the FV and LV that is used as a compensation value to update, at time t, the simulated parameter of the running distance x 4 corresponding to the FV.The scientific literature uses the term "crisp value" when referring to this output as a numerical value of an FIS.

Common Configuration
The fuzzification step is similar to the approach of Li and Zhu [39], who developed a new control strategy for car-following scenarios.The main difference arises from the choice of a minimum distance between the LV and FV (of S = 4.50 m) because this article uses real-world traffic data for validation instead of simulation-generated data as in the research by Li and Zhu [39] and, consequently, considers Equation (2) that, according to Khodayari et al. [34] and Pan and Zheng [33], avoids collisions during a car-following scenario.This influences the definition of both input linguistic variables, with the detailed intervals shown in Table 2.In all cases, the significance of the membership functions is defined at the beginning of Section 3.2.RELATIVE_VELOCITY is expressed in m/s and the distance I NTERVEH ICLE_SPACI NG is expressed in meters.Figure 4 shows a visual representation of the inputs as a result of the implementation of the FIS in MATLAB R2023a, Natick, MA, USA: The MathWorks Inc. using the Fuzzy Logic Toolbox.The expression of the linguistic variable called RELATIVE_VELOCITY can have the membership values in one of the fuzzy sets NB, ZE, or PB.The choice of these three fuzzy sets is related to the approach of Li and Zhu [39] and is strengthened by the need for a fast decision-making process to identify the right reaction in the control strategy of the FV based on the observed behavior of the LV.The reading of sensor data can introduce delays, and, consequently, an erroneous value received from the sensor network could lead to an unwanted collision between the FV and LV.In this way, it is not feasible to define the fuzzy sets NS and PS for this variable because their use cannot guarantee collision avoidance.
For the variable I NTERVEH ICLE_SPACI NG, the fuzzy sets NB, ZE, PS, and PB can be defined because they represent the ideal spacing between the FV and LV as they result from the observed model and there is no need for a real-time read of the sensor data.However, the use of NS is not necessary because a correlation with the measurement of sensor data can lead in some cases to collisions; consequently, the choice was to adopt a prudential attitude for this variable also.The degree of membership for each input variable complies with the definition from Table 2. Table 3 contains the knowledge base associated with Mamdani and Takagi-Sugeno FISs.Consequently, this matrix form expresses the mapping between the output s_OFFSET_M and s_OFFSET_TS, respectively, of the inference engine based on the fuzzified inputs RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG.

Mamdani
Table 4 presents the membership functions for the output of the Mamdani FIS; the significance is the same as defined at the beginning of Section 3.2, and s_OFFSET_M is expressed in meters.The reason behind choosing the range as [−25.50;25.50] for the output s_OFFSET_M is that the implemented car-following model by default sums the standard safety distance S in the FV control strategy as defined in Equation (1).Following this approach, the range chosen for s_OFFSET_M corresponds to the range set for I NTERVEH ICLE_SPACI NG.A graphical representation of the membership functions associated with the output s_OFFSET_M is available in Figure 5.The method chosen for defuzzification in the case of the Mamdani FIS uses the center of gravity technique (i.e., centroid); this method is applied in many other works [20,27,28,41,42].According to this defuzzification technique, a crisp output Z calculated for continuous values uses the curve of the scaled output membership function µ(x), as expressed in Equation ( 5) [29,43].

Takagi-Sugeno
Figure 7 shows a visual representation of the configuration set for the membership functions associated with the output s_OFFSET_TS.The significance of the membership functions is kept as at the beginning of Section 3.2.Compared to the Mamdani FIS, the Takagi-Sugeno technique uses crisp values to represent the output.The choice of values corresponding to the membership functions is argued through a worst-case scenario where an additional value of PB equal to the standard safety distance S = 4.50 m should be applied as a compensation value to the simulated running distance of the FV x 3 to avoid collisions with the LV.Otherwise, the application of a compensation value corresponding to NB contributes to the stability of the simulated model and directly influences the behavior of other pairs of (LV, FV) moving in a chain inside the same traffic lane, behind the pair of (LV, FV) targeted for calibration.The defuzzification of the Takagi-Sugeno FIS uses the weighted average technique for the output and considers the constant values defined for the five membership functions represented in Figure 7. Consequently, Equation ( 6) expresses the calculation of the crisp output Z as a weighted average of the total clipped singletons [30,31].
The surface diagram describing the three-dimensional relationship between the inputs RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG, respectively, and the output s_OFFSET_TS of the Takagi-Sugeno FIS, is available in Figure 8.

Experimental Case Study-Simulation Model
The simulation experiment uses Simulink (MATLAB R2023a, Natick, MA, USA: The MathWorks Inc.) to implement the car-following model (Figure 9).Compared to the approach of Khodayari et al. [34] and Pan and Zheng [33], which represents the basis of the model used in this research, this simulation model was modified to introduce parallel calculations for the running distance x 4 of the FV and for the dynamic safety distance y to cover the needs for the visualization of the simulated behavior of the car-following model in the presence of Mamdani and Takagi-Sugeno FISs, respectively.This allows for an easier comparison to the observed model, which is considered as the ideal model (i.e., free of measurement errors).Consequently, Figure 9 illustrates three implementations of the continuous-time car-following model [33,34] marked and referred accordingly in the picture to comply with the methodology described in Figure 1.The observed car following uses as input the velocities of the LV (x 1 ) and FV (x 3 ) and calculates the output consisting of the dynamic safety distance (y) according to Equations ( 1) and ( 2).
Following the methodology illustrated in Figure 1, a calibration system is introduced to update the parameters of the simulated model by applying the right compensation values so that this model can fully replicate the behavior of the observed model.Since there are two fuzzy techniques to be evaluated within this research (i.e., Mamdani and Takagi-Sugeno), Figure 9 shows its parallel implementation and emphasizes the application of the determined compensation values (i.e., s_OFFSET_x, x = {M; TS}) to the corresponding simulated car-following models.To observe the behavior of the two fuzzy-based calibration models, measurement and simulation errors are simulated by noise injection using the Simulink block entitled Band-Limited White Noise with the following characteristics: noise power = 0.10, sample time = 0.10, and seed = 23,341 [13].The noise produced is a function of normally distributed random numbers and includes both measurement and simulated model errors.The detailed view of the calibration subsystem (Figure 10 shows that it contains a parallel implementation of Mamdani and Takagi-Sugeno FISs as shown in the conceptual model (Figure 1).The development of these FISs uses the Fuzzy Logic Toolbox available in MATLAB R2023a (Natick, MA, USA: The MathWorks Inc.) and complies with the definition of membership functions previously presented in this methodology.This implementation uses the notation I NTERVEH ICLE_SPACI NG to rename the dynamic distance s (i.e., the ideal distance between the FV and LV as it results from the observed model without the application of the standard safety distance S) so that it can comply with the fuzzy theory that uses the notation with easily interpreted significance [24] and is according to the notation adopted in the definition of membership functions.The use of the Simulink block entitled Transport Delay immediately after the output of the Fuzzy Logic Controller blocks aims to cover the processing and response time of these units and, consequently, to ensure that the proposed calibration model fits to real-time processing.
The validation of the calibration models uses real traffic data from the local center for traffic monitoring and control in Timis , oara city, Romania.The input data consist of velocity profiles (Figure 11) for the LV and FV, collected by inductive loop detectors from urban infrastructure during August 2019; the corresponding section of the road is located between two crowded crossroads (i.e., Liviu Rebreanu-Calea S , agului and Liviu Rebreanu-Gheorghe Ranetti) [13].

Performance Evaluation
Performance analysis considers the calibration time of Mamdani and Takagi-Sugeno FISs as the main method of evaluation; this metric is also observable based on a visual analysis of the obtained results.
To obtain a better overview in terms of performance, this research also uses the same methodology as in other similar studies [9,11,31,[44][45][46].These evaluation metrics are the mean absolute error (MAE) and root mean square error (RMSE).Equations ( 7) and ( 8) express the calculation for these metrics used for performance evaluation, where Y obs i and Y sim i are the i-th recordings of observed and simulated values from a total of N recorded data.
The calculation of these metrics for the running distance x 4 of the FV and for the dynamic safety distance y is available in Section 5.

Results
The simulation results (Figure 12) show that both the Mamdani and Takagi-Sugeno FISs succeeded in calibrating the car-following model used in this simulation experiment.A visual analysis of the results obtained demonstrates that collision avoidance is ensured in both cases, something recognized by the absence of intersection points between the running distances of the LV (x 2 ) and FV (x 4 ).
The Takagi-Sugeno FIS behaves better than the Mamdani FIS in identifying the timevarying appropriate compensation values that, applied to the simulated running distance of the FV (x4_simulated_TS), are close to the observed value x 4 compared to the simulated running distance of the FV (x4_simulated_M) obtained in the case of the Mamdani FIS.A detailed overview of the calibration process also demonstrates a more stable calibration process in the case of the Takagi-Sugeno FIS, while the Mamdani FIS needs more time to achieve a stable behavior, and some perturbations appear at the beginning.The perturba-tions are strongly related to the definition of the output membership functions as fuzzified values in the case of the Mamdani FIS, while the definition of the output membership functions for the Takagi-Sugeno FIS as a crisp constant value offers a more predictable support in identifying the appropriate compensation values.At the same time, between achieving stable behavior and successfully calibrating the car-following model, the Mamdani FIS introduces a higher uniform increase in computation error that leads to scaled-down values of the running distance of the FV (x4_simulated_M) compared to the values obtained in the case of the Takagi-Sugeno FIS (x4_simulated_TS).However, these scaled-down values also appear in the case of the Takagi-Sugeno FIS compared to the observed value of the running distance of the FV (x 4 ), but are smaller; a complete overview of this impact is provided in Section 5.
The effect of the two implemented calibration methods is also visible in the output of the car-following model consisting of the dynamic safety distance y, as illustrated in Figure 13.Here, a better overview of the impact of the differences between the two fuzzy techniques is provided.The application of the standard safety distance S according to Equation (2) makes it more visible that the Takagi-Sugeno FIS achieves better performance compared to the Mamdani FIS.Based on several computations, the effect of the scaleddown simulated values of the FV running distance is reflected in the scaled-up simulated values of the dynamic safety distance y.

Discussion
The results obtained after performing the simulation experiment demonstrate that both fuzzy techniques analyzed in this article are suitable for applications responsible for the online calibration of car-following models and fit to real-time processing.This statement is strengthened by the existing literature because the uncertainties related to the calibration process of car-following models require the implementation of applications where interpretability and linguistic descriptions are needed (e.g., decision support systems, expert systems, etc.) [6,24,47].At the same time, the Takagi-Sugeno FIS is considered suitable for applications (e.g., control systems, function approximation, etc.) that need crisp numerical outputs [7,26,27].
However, there are differences in terms of computational efficiency; the existence of perturbations and higher scale-down simulated values of the FV running distance before the system achieves the calibrated state are explained by the existing literature.The Mamdani FIS identifies fuzzy output values through the aggregation of multiple fuzzy rule outputs [6,24,26,27], like the center of gravity technique applied in this research, while each fuzzy rule contributes a weighted linear function to the overall output in the case of the Takagi-Sugeno FIS [7,26,27].
Table 5 presents the values of the performance metrics used in this research, calculated based on the obtained values of the simulated running distance x 4 of the FV corresponding to both fuzzy techniques used in the calibration of the car-following models.MAE expresses the average magnitude of errors between the observed and simulated values and shows that the Takagi-Sugeno FIS is able to identify the most appropriate compensation values, leading to closer values of the simulated FV running distance to the observed model compared to the values obtained based on the Mamdani FIS.Furthermore, analysis of the RMSE values indicates that the Takagi-Sugeno FIS has better predictive accuracy compared to the Mamdani FIS.Table 6 shows the values calculated for the performance metrics used in this research (i.e., MAE and RMSE) based on the dynamic safety distance y to validate the application of Mamdani and Takagi-Sugeno FISs in the calibration of a continuous-time car-following model.Similar to the evaluation of these metrics in the case of running distance x 4 , the Takagi-Sugeno FIS shows better performance demonstrated by reduced simulation errors.The efficiency of both techniques is visible because the differences in the values obtained for these indicators are similar to those obtained in Table 5, even if here the simulation and measurement errors related to the velocity of the LV (x2_simulated) are additionally considered.The application of the standard safety distance S in the calculation of y has no effect on influencing the performance of the two fuzzy techniques because it applies to all the time-varying processed parameters and is a constant value that is provided by the car-following strategy and cannot be measured.Thus, even if both fuzzy techniques can be successfully applied for the calibration of car-following models, the Takagi-Sugeno FIS is characterized by more accurate results, the computational efficiency being ensured by the use of constant crisp values in the definition of the membership functions and the application of the weighted average technique in the determination of the FIS output.

Conclusions
This article addresses a gap in the scientific literature consisting of the absence of a comparative analysis between the application of Mamdani and Takagi-Sugeno FISs for the calibration of car-following models.The proposed methodology for performing this comparison consists of defining the membership functions of both FISs considering the standard safety distance that should be applied in the FV control strategy to avoid collisions during travel.Although the input membership functions and the fuzzy rules are the same, the differences arise from the definition of the output membership functions (i.e., the Mamdani FIS contains fuzzified values and the Takagi-Sugeno FIS has constant crisp values).
A simulation experiment performed in Simulink (MATLAB R2023a, Natick, MA, USA: The MathWorks Inc.) shows that both FISs succeeded in calibrating the car-following model.However, the Takagi-Sugeno FIS obtains better results in terms of performance according to the evaluation of performance metrics represented by MAE and RMSE, widely used for evaluation in related work.The impact of the computation errors that lead to scaled-down values of the running distance of the FV is also observable in both cases, but the differences are smaller in the case of the Takagi-Sugeno FIS.
Furthermore, the Takagi-Sugeno FIS is suitable for use in the calibration process of car-following models based on the stability process of the identification of the timevarying compensation values, whereas the approach using the Mamdani FIS is affected by perturbations.The source of these perturbations is strongly connected to the definition of output membership functions: the higher surface of values covered in the case of the Mamdani FIS can introduce erroneous compensation values, while the Takagi-Sugeno FIS offers a more stable behavior because of the definition of output membership functions as crisp constant values.
However, this research also has some limitations that can be addressed in future research.This results from the intervals chosen for the membership functions and also from the type of function chosen.The particularity of the continuous-time car-following model used in this research can influence the behavior of the calibration method and can impact the performance of the FIS.The weaknesses of this research are also related to the use of simulated fault injection to represent the errors from the measurement of sensor data and those introduced by the simulation process, the configuration of the Simulink Band-Limited White Noise block also having influence on the calibration process.

Future Research
Future research can perform comparative evaluations of these two fuzzy techniques in the presence of additional control mechanisms such as genetic algorithms or neural networks.Also, it is worth analyzing how Mamdani and Takagi-Sugeno FISs behave for the calibration of traffic models at upper levels of modeling, such as mesoscopic and macroscopic.
Future research can also address the limitations of this research described at the end of Section 6.It is worth analyzing the impact of the use of combinations of different types of membership function (i.e., Gaussian, triangular, trapezoidal, etc.) on the calibration of car-following models.Also, changes can be made in the intervals associated with the membership functions, and the compensation values obtained can be monitored.
The use of fault injection mechanisms can be replaced by approximated values of the possible measurement errors calculated according to the worst-case scenario by subtracting the values corresponding to the tolerance associated with the sensors used for traffic data acquisition.Currently, the data used in this research are provided by the local traffic management center, and the obtained data do not have details related to the data sheets of the inductive loops placed in the city for traffic monitoring.
Another way to collect data for the simulation is to use specific simulators and human subjects.In addition to recording the traffic profiles from the simulator, the emotional behavior of the human subject can also be recorded.The use of tools such as eye-tracking, galvanic skin response analysis, or heart rate analysis facilitates the classification of driver behavior that can be introduced as a third input variable of the FIS.This is essential for adopting the appropriate car-following strategy in the case of autonomous vehicles due to the possible interaction with human-driven vehicles on the road.

Figure 3 .
Figure 3.The main components of a fuzzy inference system (FIS).

Figure 4 .
Figure 4. Membership functions of the inputs of the fuzzy inference systems (FISs).

Figure 5 .
Figure 5. Membership functions of the output of the Mamdani fuzzy inference system (FIS).

Figure 6
Figure 6 illustrates a three-dimensional view of the relationship between the inputs (i.e., RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG) and the output (i.e., s_OFFSET_M) of the Mamdani FIS.The flat region on the right shows a constant behavior in the output of the degree of membership of the output fuzzy set.The yellow area indicates the area with the most activated output fuzzy set associated with the input values of RELATIVE_VELOCITY and I NTERVEH ICLE_SPACI NG.The large flat area associated with this yellow area shows that the activation of it has a constant behavior.

Figure 7 .
Figure 7. Membership functions of the output of the Takagi-Sugeno fuzzy inference system (FIS).

Figure 11 .
Figure 11.Simulation model: velocity profiles for the leader vehicle (LV) and the follower vehicle (FV) used as input for the implementation of the car-following model using Simulink (MATLAB R2023a, Natick, MA, USA: The MathWorks Inc.) [13].

Figure 12 .
Figure 12.Experimental results: running distances for leader vehicle (LV) and follower vehicle (FV) during calibration process.

Figure 13 .
Figure 13.Experimental results: dynamic safety distance during calibration process.

Table 2 .
Linguistic variables for the input of the fuzzy inference systems (FISs).

Table 3 .
Fuzzy rules for the inputs and output variables of the fuzzy inference systems (FISs).

Table 5 .
Comparison between results error in the running distance x 4 of the follower vehicle (FV).

Table 6 .
Comparison between results error in the dynamic safety distance y.